﻿package com.zouloux.core.events
{
	import flash.events.Event;
	
	/**
	 * ...
	 * @author ZoulouX
	 */
	public class NavigationErrorEvent extends Event 
	{
		/**
		 * L'url de la structure n'a pas été trouvée
		 */
		public static const STRUCTURE_LOAD_ERROR	:String = "structureLoadError";
		
		/**
		 * Impossible de parser la structure
		 */
		public static const STRUCTURE_PARSE_ERROR	:String = "structureParseError";
		
		/**
		 * NotFound
		 */
		public static const NOT_FOUND				:String = "notFound";
		
		/**
		 * La cause
		 */
		public var message	:String;
		
		
		/**
		 * Constructeur
		 * @param	type
		 * @param	bubbles
		 * @param	cancelable
		 */
		public function NavigationErrorEvent(type:String, pMessage:String = "") 
		{ 
			message = pMessage;
			super(type, bubbles, cancelable);	
		}
		
		// Trucs débiles
		public override function clone():Event 
		{ 
			return new NavigationEvent(type, bubbles, cancelable);
		} 
		public override function toString():String 
		{ 
			return formatToString("NavigationErrorEvent", "type", "bubbles", "cancelable", "eventPhase"); 
		}
	}
}